@extends('dashboard.base')
@section('content')
<div class="card">
  <div class="card-header">
    <h3>基本信息</h3>
  </div>
  <div class="card-body">
    
    <!-- <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
    <a href="#" class="btn btn-primary">Go somewhere</a> -->
    <div class="row">
    	<div class="col-3">订单号：{{ $order->order_number }}</div>
    	<div class="col-3">下单时间：{{ $order->created_at }}</div>
    	<div class="col-3">订单状态：{{ $order->status }}</div>
    	<div class="col-3">购买用户：{{ $order->user->name }}</div>
    </div>
    <div class="row mt-4">
    	<div class="col-3">
    		订单金额：{{ $order->order_total_price }}
    	</div>
    	<div class="col-3">
    		支付方式：
    	</div>
    	<div class="col-3">
    		配送方式：
    	</div>
    	<div class="col-3">
    		退货原因：
    	</div>
    </div>
    <div class="row mt-4">
    	<div class="col-3">
    		快递单号
    	</div>
    	<div class="col-3">
    		预计到货时间
    	</div>
    </div>
  </div>
</div>

<div class="card">
	<div class="card-header">
    <h3>收货人信息</h3>
  </div>
  <div class="card-body">
  	<p class="p-2">收货人：{{$order->address->full_name}}</p>
  	<p class="p-2">联系电话: {{$order->address->phone }} </p>
  	<p class="p-2">收货地址:{{ $order->address->full_address }}</p>
  </div>
</div>

<div class="card">
	<div class="card-header">
    <h3>商品信息</h3>
  </div>
  <div class="card-body">
  	@foreach($order->goods() as $v)
  		<div class="row mb-2">
  			<div class="col"><img src="{{ Storage::url($v->goods->cover_img) }}" width="50" height="50"></div>
  			<div class="col">{{ $v->goods->name }}</div>
  			<div class="col">{{ $v->goods->price }}</div>
  			<div class="col"></div>
  		</div>
  	@endforeach
  </div>
</div>

@endsection